<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>


</head>

<body>

<table width="100%" border="1">
  <tr>
    <td>
<!----------------------------------------------------------------------------------------------------------INICIO 1 -->        
<table width="100%" border="1">
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>

<!----------------------------------------------------------------------------------------------------------FIN 1 -->            
    </td>
  </tr>
  <tr>
    <td>
    
<!----------------------------------------------------------------------------------------------------------INICIO 2 -->    
<table width="100%" border="1">
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
<!----------------------------------------------------------------------------------------------------------FIN 2 -->    
    
    
    </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>
<!----------------------------------------------------------------------------------------------------------INICIO 3 -->        
<table width="100%" border="1" id="js-tabla" >
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
<br>
<input name="botoon" id="botoon" type="button" value="botoon" />

<script>
$(document).ready(function(e) {
    eliminar_fila();
});
</script>
<script>

//		nueva_fila  = '<tr>';
//		nueva_fila  += '    <td>xxxxxxxx</td>';
//		nueva_fila  += '    <td>&nbsp;</td>';
//		nueva_fila  += '    <td>&nbsp;</td>';
//		nueva_fila  += '    <td>&nbsp;</td>';
//		nueva_fila  += '    <td>&nbsp;</td>';
//		nueva_fila  += '</tr>';		


	var contador_nueva_fila = 2;
	function displayResult()
	{	
		var nueva_fila = '';	
		
		nueva_fila  = '   <tr class="numeracion" >';
		nueva_fila += '     <td>'+ contador_nueva_fila +'</td>';
		nueva_fila += '     <td><input name="nombre" type="button" value="nombre" /></td>';
		nueva_fila += '     <td class="eliminar" >Eliminar</td>';
		nueva_fila += '   </tr>';
		
		document.getElementById("Tabla_nueva_fila").insertRow(-1).innerHTML = nueva_fila;
		contador_nueva_fila++;
	}

	function eliminar_fila(){
	$(function(){
		$(document).on("click",".eliminar",function(){
		if(contador_nueva_fila>2){
			var parent = $(this).parents().get(0);
			$(parent).remove();
			contador_nueva_fila--;
			$(".numeracion").each(function (index) {
				$(this).text(index + 1);
			});			
		}
		});
	
	});
	}
</script>
    
<!----------------------------------------------------------------------------------------------------------FIN 3 -->            

<table id="Tabla_nueva_fila" width="100%" border="0">
  <tr>
    <td colspan="3">Observaciones</td>
  </tr>
  <tr>
    <td valign="top" class="numeracion">1</td>
    <td><textarea name="textarea" class="num_observacion" cols="45" rows="2" style="width:800px" ></textarea></td>
    <td align="left" class="eliminar">Eliminar</td>
  </tr>
</table>
<button type="button" onClick="displayResult()">Insertar nueva observaci&oacute;n</button>  
    </td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>



</body>
</html>





